<?php

/**
 * Created by Reliese Model.
 */

namespace App\Models;

use App\Engine\BaseModel;
use Illuminate\Database\Eloquent\Model;

/**
 * Class AroundEnvironment
 *
 * @property int $id
 * @property int $house_id
 * @property string|null $background
 * @property string|null $content
 * @property string|null $position
 * @property int $sort
 * @property int $hiddem
 *
 * @package App\Models
 */
class AroundEnvironment extends BaseModel
{
	protected $table = 'around_environment';
	public $timestamps = false;

	protected $casts = [
		'house_id' => 'int',
		'sort' => 'int',
		'hiddem' => 'int'
	];
	protected $fillable = [
		'house_id',
		'background',
		'content',
		'position',
		'sort',
		'hiddem',
        "name"
	];
	public $with=["house"];

    public $rule=[
        'house_id'=>'required',
        'background'=>'required',
        'content'=>'required',
        'sort'=>'required',
        'name'=>'required'
    ];
    public $ruleMessage=[
        'house_id.required'=>"请选择项目",
        'background.required'=>"请上传图片",
        'content.required'=>"详情不能为空",
        'sort.required'=>"请选择排序",
        'name.required'=>"名称不能为空",
    ];

}
